/**
 */
package org.mro.grib.model.files.secondEdition.grids;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Projection Centre</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.mro.grib.model.files.secondEdition.grids.GridsPackage#getProjectionCentre()
 * @model annotation="http://www.eclipse.org/emf/2002/GenModel description_en='Flag table 3.5 \u2013 Projection centre'"
 * @generated
 */
public enum ProjectionCentre implements Enumerator {
	/**
	 * The '<em><b>USED POLE</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #USED_POLE_VALUE
	 * @generated
	 * @ordered
	 */
	USED_POLE(1, "USED_POLE", "USED_POLE"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>NUMBER OF CENTRES</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #NUMBER_OF_CENTRES_VALUE
	 * @generated
	 * @ordered
	 */
	NUMBER_OF_CENTRES(2, "NUMBER_OF_CENTRES", "NUMBER_OF_CENTRES"); //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>USED POLE</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>USED POLE</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #USED_POLE
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='North Pole is on the projection plane' 1_en='South Pole is on the projection plane'"
	 * @generated
	 * @ordered
	 */
	public static final int USED_POLE_VALUE = 1;

	/**
	 * The '<em><b>NUMBER OF CENTRES</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>NUMBER OF CENTRES</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #NUMBER_OF_CENTRES
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel 0_en='Only one projection centre is used' 1_en='Projection is bipolar and symmetric'"
	 * @generated
	 * @ordered
	 */
	public static final int NUMBER_OF_CENTRES_VALUE = 2;

	/**
	 * An array of all the '<em><b>Projection Centre</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ProjectionCentre[] VALUES_ARRAY =
		new ProjectionCentre[] {
			USED_POLE,
			NUMBER_OF_CENTRES,
		};

	/**
	 * A public read-only list of all the '<em><b>Projection Centre</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ProjectionCentre> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Projection Centre</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ProjectionCentre get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ProjectionCentre result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Projection Centre</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ProjectionCentre getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ProjectionCentre result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Projection Centre</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ProjectionCentre get(int value) {
		switch (value) {
			case USED_POLE_VALUE: return USED_POLE;
			case NUMBER_OF_CENTRES_VALUE: return NUMBER_OF_CENTRES;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ProjectionCentre(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ProjectionCentre
